using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCeViewer.CommonMethod
{
    public enum SchemaArgsCollection
    {
        Yes,
        No,
    };

    public class CreateTableSchemaArgs
    {
        private SchemaArgsCollection _option;

        public SchemaArgsCollection option
        {
            get { return _option; }
            set { _option = value; }
        }
        private string _DisplayName;

        public string DisplayName
        {
            get { return _DisplayName; }
            set { _DisplayName = value; }
        }


        
        public override string ToString()
        {
            return DisplayName;
        }
    }

    /// <summary>
    /// 
    /// </summary>
    public enum OpenMode
    {
        /// <summary>
        ///   	Permits multiple processes to open and modify the database.
        /// </summary>
        ReadWrite,
        /// <summary>
        /// Lets you open a read-only copy of the database
        /// </summary>
        ReadOnly,
        /// <summary>
        /// Does not permit other processes to open or modify the database.
        /// </summary>
        Exclusive,
        /// <summary>
        /// Permits other processes to read, but not modify, the database while you have it open.
        /// </summary>
        SharedRead,

    };

    /// <summary>
    /// Swith open db mode args
    /// </summary>
    public class OpenModeClass
    {
        private OpenMode _mode;

        public OpenMode mode
        {
            get { return _mode; }
            set { _mode = value; }
        }

        private string _modeDisplayName;

        public string modeDisplayName
        {
            get { return _modeDisplayName; }
            set { _modeDisplayName = value; }
        }

        public override string ToString()
        {
            return modeDisplayName;
        }
    }

    /// <summary>
    /// Args for create table and modify table schema using
    /// </summary>
    internal class CreateTableArgs
    {
        private string  _fieldName;

        public string  fieldName
        {
            get { return _fieldName; }
            set { _fieldName = value; }
        }
        private string _dataType;

        public string dataType
        {
            get { return _dataType; }
            set { _dataType = value; }
        }

        private int _dataLength;

        public int dataLength
        {
            get { return _dataLength; }
            set { _dataLength = value; }
        }

        private bool _isUnique;

        public bool isUnique
        {
            get { return _isUnique; }
            set { _isUnique = value; }
        }
        private bool _isPrimaryKey;

        public bool isPrimaryKey
        {
            get { return _isPrimaryKey; }
            set { _isPrimaryKey = value; }
        }

        private bool _allowNulls;

        public bool allowNulls
        {
            get { return _allowNulls; }
            set { _allowNulls = value; }
        }
    }

    /// <summary>
    /// Vital
    /// </summary>
    public enum TreeItemType
    {
        Table,
        Column,
        Index,
        ColumnParentNode,
        IndexParentNode,
        NotDefined,
    }

    internal class TreeItemArgs
    {
        private string _indexName;

        public string IndexName
        {
            get { return _indexName; }
            set { _indexName = value; }
        }
        private string _tableName;

        public string TableName
        {
            get { return _tableName; }
            set { _tableName = value; }
        }

        private string _columnName;

        public string ColumnName
        {
            get { return _columnName; }
            set { _columnName = value; }
        }

        private TreeItemType  _itemType;

        public TreeItemType  ItemType
        {
            get { return _itemType; }
            set { _itemType = value; }
        }

        
    }

    [Serializable()]
    internal class DbHistoryList
    {
        private List<string> _DbHistoryFullPathList;

        public List<string> DbHistoryFullPathList
        {
            get { return _DbHistoryFullPathList; }
            set { _DbHistoryFullPathList = value; }
        }

        
    }

}
